//
//  LTView.m
//  AddressBook0825_58
//
//  Created by dllo on 15/11/21.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "LTView.h"

@implementation LTView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView {
    self.myLabel = [[UILabel alloc] initWithFrame:CGRectMake(50, 10, 50, 30)];
    self.myLabel.layer.borderWidth = 1;
    self.myLabel.layer.cornerRadius = 10;
    self.myLabel.textAlignment = 1;
    [self addSubview:self.myLabel];
    
    
    self.myTextField = [[UITextField alloc] initWithFrame:CGRectMake(120, 10, 150, 30)];
    self.myTextField.layer.cornerRadius = 10;
    self.myTextField.layer.borderWidth = 1;
    [self addSubview:self.myTextField];
    self.myTextField.clearButtonMode = UITextFieldViewModeAlways;
    
    self.myTextField.delegate = self;
    
    
}


- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [self.myTextField resignFirstResponder];
    return YES;
}

@end
